<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2017 https://git.oschina.net/honoryao All rights reserved.
// +----------------------------------------------------------------------
// | Author: honoryao <2463523099@qq.com>-2017/8/17
// +----------------------------------------------------------------------
// | app\home\controller-Common
// +----------------------------------------------------------------------

/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/8/17
 * Time: 15:57
 */

namespace app\home\controller;
use app\common\controller\Base;

class Common extends Base
{
    public function allsection()
    {
        $list=model('Section')->field('id,name')->select();
        if ($list) {
            $ret=['rel'=>1,'msg'=>'获取成功','data'=>$list];
        }else{
            $ret=['rel'=>0,'msg'=>'获取失败','data'=>[]];
        }
        return json($ret);
    }
}